﻿using SqlSugar;
using System.ComponentModel.DataAnnotations;

namespace Qy.Scenario;

[SugarTable(DbTableName.QyDictData)]
public class DictData
{
    [SugarColumn(IsPrimaryKey = true)]
    public int Id { get; set; }
    public int Cid { get; set; }
    [Display(Name = "字典键")]
    [RegularExpression(RegxPatterns.Number, ErrorMessage = "{0}必须为数字")]
    public int Key { get; set; }
    [Required(ErrorMessage = "字典值未填写")]
    public string Value { get; set; }
    public string Remark { get; set; }
    public bool Status { get; set; }

}

public class ViewDictData
{
    public int Id { get; set; }
    public int Cid { get; set; }
    public string CatCode { get; set; }
    public string CatName { get; set; }
    public int Key { get; set; }    
    public string Value { get; set; }
    public string Remark { get; set; }
    public bool Status { get; set; }

}

public class ListViewDictData
{
    public int Id { get; set; }
    public string CatCode { get; set; }
    public int Key { get; set; }
    public string Value { get; set; }
}

public class QueryDictData:PagerInfo
{
    public int Cid { get; set; } = 0;
    public int Key { get; set; }
    public string Value { get; set; }

}

